package com.wanxi.game;

public class GuessHeight {
    /**
     * 猜身高
     * 1.身高范围 MyRandom
     * 2.用户输入一个身高 MyScanner
     * 3.比较身高 GuessHeight
     * -----------------
     */
    public static void main(String[] args) {
        int height = MyRandom.getRandomNum(30, 200);
        int in = MyScanner.getNumSystemIn("请猜一下身高，单位厘米");
        judge(height, in);
    }

    private static void judge(int height, int in) {
        if (height > in) {
            System.out.println("你猜的身高太矮了");
        } else if (height < in) {
            System.out.println("你猜的身高太高了");
        } else {
            System.out.println("你好聪明");
        }
    }
}
